package com.sdcqjy.property.home.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.sdcqjy.property.base.BaseFragment;

/**
 * Created by 磁磁帅 on 2018/3/29.
 * 功能：
 */

public class HomeContentAdapter extends FragmentPagerAdapter {
    public HomeContentAdapter(FragmentManager fm, BaseFragment fragment[]) {
        super(fm);
        this.fragment = fragment;
    }

    private BaseFragment fragment[];

    public Fragment getItem(int position) {
        return fragment[position];
    }

    public int getCount() {
        return fragment.length;
    }

    public CharSequence getPageTitle(int position) {
        switch (position) {
            case 0:
                return "企业产（股）权";
            case 1:
                return "企业增资扩股";
            case 2:
                return "实物资产";
        }
        return super.getPageTitle(position);
    }
}
